package com.ego.bo;

import lombok.Data;

import java.util.Map;


/**
 * @author Ares
 */
@Data
public class SearchRequest {
    private String key;
    private Integer page;
    private Integer size = DEFAULT_SIZE ;
    private Map<String,String> filters;

    private static final Integer DEFAULT_PAGE = 1;
    private static final Integer DEFAULT_SIZE = 20;

    public Integer getPage() {
        if (page == null) {
            page = DEFAULT_PAGE;
        }
        return page;
    }
}
